/*  
* Copyright (c) 2010, James Daniello
* This project is licensed under the 'New BSD' license.
* The full text of the license can be found in the root
* directory under the filename "LICENSE"
*/
package src.gui;

import javax.swing.JLabel;
import javax.swing.ImageIcon;

/**
* This class only serves one specific purpose. It it used to show the an imageicon by applying
* it to a Jlabel after a short delay.
*/
public class PICAIUDelayedImageIconSetter extends Thread{

  JLabel label;
  ImageIcon image;
  int delay;
  

  public PICAIUDelayedImageIconSetter(JLabel parent, ImageIcon imageIn, int delayIn){
    label=parent;
    image=imageIn;
    delay=delayIn;
  }

  public void run(){
    try{
      this.sleep(delay);
      if(!PICAIUClientGUILogin.hideLoading){
        label.setIcon(image);
      }else{
        label.setIcon(null);
      }
    }catch(Exception e){}
  }


}